// 两个组件，用户输入组件+邮件输入组件，两个组件都要有数据跟踪功能和事件处理功能
import useFormValue from '../hooks/useFormValue';


function UserForm() {
    const [value, onChange] = useFormValue('admin');
    return <input type="text" value={value} onChange={onChange} />
}

function EmailForm() {
    const [value, onChange] = useFormValue();
    return <input type='email' value={value} onChange={onChange} />
}

export { UserForm, EmailForm };

// export { UserForm, EmailForm }; => import { UserForm, EmailForm } from './MyForm.jsx';
// export default UserForm; => import UserForm from './MyForm.jsx';